//统一相应结果
export interface ResponseData {
    code: string | number,
    message: string,
    ok: boolean
}

//用户信息
export interface User {
    id?: number | string,
    username: string,
    password: string,
    name: string,
    phone?: string,
    roleName?: string,
    createTime?: string,
    updateTime?: string,
    flag?: boolean
}

//用户信息数组
export type Records = User[];

//用户信息分页查询结果
export interface UserResponseData extends ResponseData{
    data: {
        records: Records,
        total: number | string,
        size: number | string,
        current: number | string,
        pages: number | string
    }
}

//职位信息
export interface Role {
    id?: number | string,
    roleName: string,
    remark?: any
}

//职位信息数组
export type Roles = Role[];

//职位信息返回结果
export interface RoleResponseData extends ResponseData{
    data: {
        assignRoles: Roles,
        allRolesList: Roles,
    }
}

//给用户分配职位需要携带的参数
export interface SetRoleData {
    roleIdList: number[],
    userId: number | string
}